import torch

a = torch.FloatTensor([[0, 1, 2], [3, 4, 5]])

# 1、求最大值
print(a.max())
# 2、求最大值下标
print(a.argmax())
# 3、求分维度最大值和下标
print(a.max(dim=1))
print(a.argmax(dim=1))
# 4、求平均
print(a.mean())
# 5、求积
print(a.prod())
# 6、求和
print(a.sum())